﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Omabar.BLL;
using Omabar.Model;

namespace Omabar.CMS.CMS
{
    public partial class SliderEdit : System.Web.UI.Page
    {

        protected SLIDER slider = null;
        protected string slider_id;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Slider_BLL bll = new Slider_BLL();

                slider_id = Request["id"];
                slider = bll.GetModel(slider_id);
                if (slider == null) slider = new SLIDER();

                switch (slider.SLIDER_TYPE.ToString())
                {
                    case "0":
                        this.SLIDER_TYPE.Items.Add(new ListItem("T图(1920x800)", "0"));
                        break;
                    case "1":
                        this.SLIDER_TYPE.Items.Add(new ListItem("欧玛贝独创(1000*360", "1"));
                        break;
                    case "2":
                        this.SLIDER_TYPE.Items.Add(new ListItem("特色项目(300*300)", "2"));
                        break;

                }

            }
        }
    }
}